<template>
	<view>
		<!-- 自定义导航 -->
		<custom-navbar :title='title' bgColor='#0081ff' navbarStyle='custom'></custom-navbar>
		<view class="width padding">
			<!-- 显示订单信息 -->
			<view class="orderModule">
				<view class="flex-row flex-sub solid-bottom">
					<view class="text-black text-bold text-d " style="width: 150rpx;">开始时间</view>
					<view class="flex-sub margin-left">{{orderInfo.beginTime}}</view>
				</view>
				<view class="flex-row flex-sub solid-bottom">
					<view class="text-black text-bold text-d " style="width: 150rpx;">结束时间</view>
					<view class="flex-sub margin-left">{{orderInfo.endTime}}</view>
				</view>
				<view class="flex-row flex-sub solid-bottom">
					<view class="text-black text-bold text-d " style="width: 150rpx;">行程次数</view>
					<view class="flex-sub margin-left">{{orderInfo.tripCount}}</view>
				</view>
				<view class="flex-row flex-sub solid-bottom">
					<view class="text-black text-bold text-d " style="width: 150rpx;">搭载乘客数</view>
					<view class="flex-sub margin-left">{{orderInfo.passengerCount}}</view>
				</view>
				<view class="flex-row flex-sub solid-bottom">
					<view class="text-black text-bold text-d " style="width: 150rpx;">订单数量</view>
					<view class="flex-sub margin-left">{{orderInfo.orderCount}}</view>
				</view>
				<view class="flex-row flex-sub solid-bottom">
					<view class="text-black text-bold text-d " style="width: 150rpx;">好评数量</view>
					<view class="flex-sub margin-left">{{orderInfo.evaluateCount}}</view>
				</view>
				<view class="flex-row flex-sub solid-bottom">
					<view class="text-black text-bold text-d " style="width: 150rpx;">好评率</view>
					<view class="flex-sub margin-left">{{orderInfo.favorableRate}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { getDriverOrder } from '../../api/driver_api';
	export default {
		data() {
			return {
				title: '订单信息',
				orderInfo:{}
			}
		},
		onLoad(option) {
			this.queryDriverOrder(option.dateValue);
		},
		methods: {
			queryDriverOrder(param){
				let params = {
					orderTime:param
				}
				getDriverOrder(params).then(res=>{
					if(res.data.code==200){
						this.orderInfo = res.data.data;
					}else{
						this.$modal.msg(res.data.msg);
					}
				})
			}
		}
	}
</script>

<style>
	.orderModule {
		width: 100%;
		height: 600rpx;
		display: flex;
		flex-direction: column;
		padding: 20rpx 20rpx;
		background-color: #fff;
		border-radius: 12rpx;
	}

</style>
